<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml"
>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>文件上传</title>
</head>
<script language="JavaScript">
    function isfull() {
        if (document.myform.file.value == "") {
            alert("文件不能为空");
            document.myform.file.focus();
            return false;
        }
        if (document.myform.nameKey.value == "") {
            alert("地名标题不能为空");
            document.myform.nameKey.focus();
            return false;
        }
    }
</script>
<body>

<div style="position: absolute;left: 35%;top: 10%">
    <h1>原始文件地名提取</h1>
    <h4 style="color: red">只能提交xls\xlsx文件，文件内容第一行为表头信息，不要写标题！</h4>
    <form name="myform" action="/upload" enctype="multipart/form-data" method="post" onsubmit="return isfull();">
        <p>原始文件：<input type="file" placeholder="" name="file"/></p>
        <p>地名标题：<input type="text" placeholder="请输入地名对应的标题名称" name="nameKey"></p>
        <input style="width: 100px;height: 45px;font-size: 20px" type="submit" value="提交">
    </form>
</div>

<!--<br><br><br><br>-->
<!--<h1>文件下载</h1>-->
<!--<a href="http://localhost:8080/data/demo.html" download="demo.html">点击下载</a>-->
</body>
</html>
